package com.honey.mybatis.generator.dao.field;

import com.honey.compilation.java.Decoration;
import com.honey.compilation.java.JavaVisibility;
import com.honey.mybatis.generator.AbstractField;
import com.honey.mybatis.generator.dao.DaoConstant;

public class CountField extends AbstractField {

	private static final String[] JAVA_DOC = new String[]{
		"查询总数量。"
	};
	
	@Override
	protected String getFieldName() {
		return DaoConstant.SELECT_COUNT_FIELD_NAME;
	}

	/* (non-Javadoc)
	 * @see com.honey.mybatis.generator.AbstractField#getDecoration()
	 */
	@Override
	protected Decoration getDecoration() {
		Decoration answer = super.getDecoration();
		answer.setVisibility(JavaVisibility.PRIVATE);
		answer.setFinal(true);
		answer.setStatic(true);
		return answer;
	}

	/* (non-Javadoc)
	 * @see com.honey.mybatis.generator.AbstractField#getInitialization()
	 */
	@Override
	protected String getInitialization() {
		return DaoConstant.SELECT_COUNT_MAPPER_NAME;
	}

	/* (non-Javadoc)
	 * @see com.honey.mybatis.generator.AbstractField#getIsformat()
	 */
	@Override
	protected boolean getIsformat() {
	
		return false;
	}

	/* (non-Javadoc)
	 * @see com.honey.mybatis.generator.AbstractField#getJavaDoc()
	 */
	@Override
	protected String[] getJavaDoc() {
		return JAVA_DOC;
	}
}
